#ifndef SOURCETRACERAY_TRACEFILTER_H
#define SOURCETRACERAY_TRACEFILTER_H

using Entity = void*;

enum TraceType_t
{
    TRACE_EVERYTHING = 0,
    TRACE_WORLD_ONLY,				// NOTE: This does *not* test static props!!!
    TRACE_ENTITIES_ONLY,			// NOTE: This version will *not* test static props
    TRACE_EVERYTHING_FILTER_PROPS,	// NOTE: This version will pass the IHandleEntity for props through the filter, unlike all other filters
};

class ITraceFilter
{
public:
    virtual bool			ShouldHitEntity(void* pEntity, int mask) = 0;
    [[nodiscard]] virtual TraceType_t     GetTraceType() const = 0;
};

class CTraceFilter : public ITraceFilter
{
public:
    bool ShouldHitEntity(Entity pEntityHandle, int contentsMask) override
    {
        return pEntityHandle != pSkip1;
    }

    [[nodiscard]] TraceType_t GetTraceType() const override
    {
        return TRACE_EVERYTHING;
    }

    Entity pSkip1 = nullptr;
};

#endif //SOURCETRACERAY_TRACEFILTER_H
